<template>
  <div class="content">
    <div class="content-card">
      <workbenchCardVue
        @onCard="onCard"
        :projectList="projectList"
        :projectImg="projectImg"
        :projectTitle="projectTitle"
      ></workbenchCardVue>
    </div>
    <div class="content-card">
      <workbenchCardVue
        :projectList="enforceList"
        :projectImg="enforceImg"
        :projectTitle="enforceTitle"
      ></workbenchCardVue>
    </div>
    <div class="content-card">
      <workbenchCardVue
        :projectList="reportList"
        :projectImg="reportImg"
        :projectTitle="reportTitle"
      ></workbenchCardVue>
    </div>
    <div class="content-card">
      <workbenchCardVue
        :projectList="settlementList"
        :projectImg="settlementImg"
        :projectTitle="settlementTitle"
      ></workbenchCardVue>
    </div>
    <div class="content-card">
      <workbenchCardVue :projectList="fileList" :projectImg="fileImg" :projectTitle="fileTitle"></workbenchCardVue>
    </div>
    <workbenchDialog ref="workbenchDialog"></workbenchDialog>
  </div>
</template>

<script>
import workbenchDialog from './components/workbench-dialog.vue';
import workbenchCardVue from './components/workbench-card.vue';
export default {
  components: {
    workbenchCardVue,
    workbenchDialog,
  },
  data() {
    return {
      projectList: [
        {
          time: '2023-08-14',
          total: '12',
          arraign: '12',
          completed: '12',
          approver: '张嘉乐',
          title: '项目信息',
          flag: true,
        },
        {
          time: '2023-08-14',
          total: '12',
          arraign: '12',
          completed: '12',
          approver: '张嘉乐',
          title: '项目资料',
          flag: false,
        },
        {
          time: '2023-08-14',
          total: '12',
          arraign: '12',
          completed: '12',
          approver: '张嘉乐',
          title: '审前分析',
          flag: false,
        },
        {
          time: '2023-08-14',
          total: '12',
          arraign: '12',
          completed: '12',
          approver: '张嘉乐',
          title: '审计承诺书',
          flag: false,
        },
      ],
      projectTitle: '项目准备',
      projectImg: '1',
      enforceList: [
        {
          time: '2023-08-14',
          total: '12',
          arraign: '12',
          completed: '12',
          approver: '张嘉乐',
          title: '资料清单',
          flag: true,
        },
        {
          time: '2023-08-14',
          total: '12',
          arraign: '12',
          completed: '12',
          approver: '张嘉乐',
          title: '审计记录',
          flag: false,
        },
      ],
      enforceTitle: '现场实施',
      enforceImg: '2',
      reportList: [
        {
          time: '2023-08-14',
          total: '12',
          arraign: '12',
          completed: '12',
          approver: '张嘉乐',
          title: '审计报告初稿',
          flag: true,
        },
        {
          time: '2023-08-14',
          total: '12',
          arraign: '12',
          completed: '12',
          approver: '张嘉乐',
          title: '审计报告审理',
          flag: false,
        },
        {
          time: '2023-08-14',
          total: '12',
          arraign: '12',
          completed: '12',
          approver: '张嘉乐',
          title: '审计报告征求意见稿',
          flag: false,
        },
        {
          time: '2023-08-14',
          total: '12',
          arraign: '12',
          completed: '12',
          approver: '张嘉乐',
          title: '审计报告签发',
          flag: false,
        },
      ],
      reportTitle: '审计报告',
      reportImg: '3',
      settlementList: [
        {
          time: '2023-08-14',
          total: '12',
          arraign: '12',
          completed: '12',
          approver: '张嘉乐',
          title: '问题管理',
          flag: false,
        },
      ],
      settlementTitle: '项目结算',
      settlementImg: '4',
      fileList: [
        {
          time: '2023-08-14',
          total: '12',
          arraign: '12',
          completed: '12',
          approver: '张嘉乐',
          title: '项目归档',
          flag: false,
        },
      ],
      fileTitle: '档案归档',
      fileImg: '5',
    };
  },
  methods: {
    onCard(item) {
      if (item === '项目信息') {
        this.$refs.workbenchDialog.initOk();
      }
      console.log(this.$refs.workbenchDialog, '111');
      console.log(item);
    },
  },
};
</script>

<style lang="scss" scoped>
.content {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: space-between;
  background: #eff2f5;
  padding: 24px;
  box-sizing: border-box;
}
.content-card {
  width: 360px;
  height: 100%;
  background: #fff;
}
</style>
